<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2" />
    <g:set var="entityName" value="${message(code: 'issue?.label', default: 'issue')}" />
    <title>新增客户反馈</title>
</head>

<body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>新增客户反馈</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link controller="issue" action="index">客户反馈</g:link>
                    </li>
                    <li class="breadcrumb-item">新增客户反馈</li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <g:if test="${flash.message}">
                <div class="message alert alert-info" role="status">${flash.message}
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                </div>
            </g:if>
            <g:hasErrors bean="${this.issue}">
                <ul class="errors" role="alert">
                    <g:eachError bean="${this.issue}" var="error">
                        <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                            <g:message error="${error}"/></li></g:eachError>
                </ul>
            </g:hasErrors>
        <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>新增客户反馈</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">
                    <g:form action="save" class="form-horizontal">
                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">联系人</label>
                            <div class="col-md-3">
                                <g:select class="form-control" name="contact.id" value="${this.issue?.contact?.id}" optionValue="contact" optionKey="contactId"
                                          from="${com.next.ContactTeam.findAllByUser(this?.user)}" noSelection="${['': '请选择']}"/>
                            </div>

                            <label class="col-md-2 col-form-label">客户</label>
                            <div class="col-md-3">
                                <g:select class="form-control" name="account.id" value="${this.issue?.account?.id}" optionValue="account" optionKey="accountId"
                                          from="${com.next.AccountTeam.findAllByUser(this?.user)}" noSelection="${['': '请选择']}"/>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">资产</label>
                            <div class="col-md-3">
                                <g:select class="form-control" name="asset.id" value="${this.issue?.asset?.id}" optionValue="asset" optionKey="assetId"
                                          from="${com.next.AssetTeam.findAllByUser(this?.user)}" noSelection="${['': '请选择']}"/>
                            </div>
                        </div>

                        

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label is-required">标题</label>

                            <div class="col-md-3">
                                <g:textField class="form-control" name="subject" id="subject" value="${this.issue?.subject}" />
                            </div>
                        </div>

                        

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label is-required">状态</label>

                            <div class="col-md-3">
                                <g:select class="form-control" name="status.id" optionKey="id" noSelection="${['': '请选择']}" optionValue="name" from="${com.next.IssueStatus.list()}" value="${this.issue?.status?.id}" />
                            </div>
                            <label class="col-md-2 col-form-label is-required">来源</label>

                            <div class="col-md-3">
                                <g:select class="form-control" name="origin.id" optionKey="id" noSelection="${['': '请选择']}" optionValue="name" from="${com.next.IssueOrigin.list()}" value="${this.issue?.origin?.id}" />
                            </div>

                        </div>

                        

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label is-required">优先级</label>

                            <div class="col-md-3">
                                <g:select class="form-control" name="priority.id" optionKey="id" noSelection="${['': '请选择']}" optionValue="name" from="${com.next.IssuePriority.list()}" value="${this.issue?.priority?.id}" />
                            </div>
                            <label class="col-md-2 col-form-label is-required">类型</label>

                            <div class="col-md-3">
                                <g:select class="form-control" name="type.id" optionKey="id" noSelection="${['': '请选择']}" optionValue="name" from="${com.next.IssueType.list()}" value="${this.issue?.type?.id}" />
                            </div>

                        </div>

                        

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label is-required">原因</label>

                            <div class="col-md-3">
                                <g:select class="form-control" name="reason.id" optionKey="id" noSelection="${['': '请选择']}" optionValue="name" from="${com.next.IssueReason.list()}" value="${this.issue?.reason?.id}" />
                            </div>

                        </div>

                        

                        <div class="form-group row">

                            <label class="col-md-2 col-form-label is-required is-required">详细说明</label>

                            <div class="col-md-8">
                                <g:textArea rows="3" class="form-control" name="description" id="description" value="${this.issue?.description}" />
                            </div>
                        </div>

                        

                        <div class="form-group row">
                            <div class="col-md-12">
                                <g:submitButton class="btn btn-info" name="update" value="保存"/></div>
                        </div>
                    </g:form>


                </div>
            </div>
            <!-- Hover table card end -->
        </div>

        <!-- Page-body end -->
    </div>
</div>
</body>

</html>